<template>
  <div class="infoMethod">
      <button  @click="open">注销账号</button>
      <button style="background:#1ac832">进入后台</button>
      <button style="background:#f19149" @click="logOut">退出</button>
  </div>
</template>

<script>
export default {
 methods: {
      open() {
        this.$prompt('正在注销账号，一旦注销无法恢复,已发送注销码到您手机', '注销账号', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          inputErrorMessage: '邮箱格式不正确'
        }).then(({ value }) => {
          this.$message({
            type: 'success',
            message: "注销成功！！"
          });
        }).catch(() => {    
          this.$message({
            type: 'info',
            message: '撤出注销'
          });       
        });
      },
     logOut () {
        this.$confirm('是否退出当前账号', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.$message({
            type: 'success',
            message: '退出成功'
            // 退出账号
          });
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });          
        });
      }
    }
}
</script>

<style lang="less" scoped>
    .infoMethod{
        margin-top: 10px;
        width: 100%;
        height: 40px;
        border-radius: 10px;
        background: #a6a6a6;
        padding: 5px;
        button{
            background: #a40000;
            border: none;
            border-radius: 15px;
            // width: 40px;
            height: 30px;
            font-size: 10px;
            padding: 2px;
            width: 50px;
            margin-left: 5px;
            cursor: pointer;
        }
    }
</style>